/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class ProductoDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression idPdto;
	public final StringExpression nombrePdto;
	public final StringExpression marcaPdto;
	public final IntegerExpression precio;
	
	public ProductoDetachedCriteria() {
		super(orm.Producto.class, orm.ProductoCriteria.class);
		idPdto = new IntegerExpression("idPdto", this.getDetachedCriteria());
		nombrePdto = new StringExpression("nombrePdto", this.getDetachedCriteria());
		marcaPdto = new StringExpression("marcaPdto", this.getDetachedCriteria());
		precio = new IntegerExpression("precio", this.getDetachedCriteria());
	}
	
	public ProductoDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.ProductoCriteria.class);
		idPdto = new IntegerExpression("idPdto", this.getDetachedCriteria());
		nombrePdto = new StringExpression("nombrePdto", this.getDetachedCriteria());
		marcaPdto = new StringExpression("marcaPdto", this.getDetachedCriteria());
		precio = new IntegerExpression("precio", this.getDetachedCriteria());
	}
	
	public UsuarioDetachedCriteria createUsuarioidUserCriteria() {
		return new UsuarioDetachedCriteria(createCriteria("usuarioidUser"));
	}
	
	public TipoProductoDetachedCriteria createTipoProductoidTipoCriteria() {
		return new TipoProductoDetachedCriteria(createCriteria("tipoProductoidTipo"));
	}
	
	public SucursalDetachedCriteria createSucursalidSucursalCriteria() {
		return new SucursalDetachedCriteria(createCriteria("sucursalidSucursal"));
	}
	
	public Producto uniqueProducto(PersistentSession session) {
		return (Producto) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Producto[] listProducto(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Producto[]) list.toArray(new Producto[list.size()]);
	}
}

